#ifndef NEWCONNECTIONDIALOG_H
#define NEWCONNECTIONDIALOG_H

#include <QDialog>

#include "commondef.h"

namespace Ui {
class NewConnectionDialog;
}

class NewConnectionDialog : public QDialog
{
    Q_OBJECT

public:
    explicit NewConnectionDialog(DataBaseType type, QWidget *parent = nullptr);
    ~NewConnectionDialog();

    MSS getConnectionInfo();

private slots:

    /**
     * @brief onCheckTypeChanged 切换SQL server验证方式
     * @param index 验证方式索引
     */
    void onCheckTypeChanged(int index);

    void onTestClicked();

    void onOpenClicked();

private:

    void updateUiByDbType();

private:
    Ui::NewConnectionDialog *ui;
    DataBaseType m_dbType;
};

#endif // NEWCONNECTIONDIALOG_H
